package org.chen.service;

import org.chen.common.page.CommonPage;
import org.chen.common.request.CreateTravelOrderRequest;
import org.chen.common.request.OrderRefundApplyRequest;
import org.chen.common.request.PageParamRequest;
import org.chen.common.request.TravelOrderRequest;
import org.chen.common.response.OrderTravelDetailResponse;
import org.chen.common.response.PreTravelOrderResponse;
import org.chen.common.response.StoreTravelOrderDetailInfoResponse;
import org.chen.common.vo.MyRecord;

import java.util.List;

public interface OrderService {

    /**
     * 订单删除
     * @param id 订单id
     * @return Boolean
     */
    Boolean delete(Long id);

    /**
     * 订单取消
     * @param id 订单id
     * @return Boolean
     */
    Boolean cancel(Long id);

    /**
     * 订单预下单(旅游)
     * @param request 预下单请求参数
     * @return PreOrderResponse
     */
    MyRecord preOrderTravel(TravelOrderRequest request);

    /**
     * 加载预下单信息(旅游)
     * @param preOrderNo 预下单号
     * @return 预下单信息
     */
    PreTravelOrderResponse loadPreTravelOrder(String preOrderNo);

    /**
     * 创建订单(旅游)
     * @param orderRequest 创建订单请求参数
     * @return MyRecord 订单编号
     */
    MyRecord createTravelOrder(CreateTravelOrderRequest orderRequest);

    StoreTravelOrderDetailInfoResponse orderTravelDetail(String orderId);

    CommonPage<OrderTravelDetailResponse> orderTravelList(Integer type, PageParamRequest pageRequest);

    StoreTravelOrderDetailInfoResponse orderTravelDetailById(Long id);

    /**
     * 订单使用
     * @param id 订单id
     * @return Boolean
     */
    Boolean take(Long id);

    Boolean cancelApplication(Long id);

    Boolean refundApply(OrderRefundApplyRequest request);
}
